#include "Soc_test.h"
int func(int arg);
int func2(int arg);
int func3(int arg);

int main(){
    asm(LOG_TRAP);
    int a = 100;
    int c = 0;
    c = func(a);
    if (c != 10191)
    {
        asm(BAD_TRAP);
    }
    else{
        asm(GOOD_TRAP);
    }
    return 0x00001000;
}

int func(int arg)
{
    asm(LOG_TRAP);
    int a = arg + 1;
    return func2(a);
}
int func2(int arg){
    asm(LOG_TRAP);
    int b = arg * arg;
    return func3(b);
}
int func3(int arg){
    int c = arg - 10;
    return c;
}
